/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardgame.game.monsters;

import cardgame.game.*;
import cardgame.game.events.*;

/**
 *
 * @author Carl
 */
public class Ziggs extends MonsterCard{

    public Ziggs(){
        description = new Description("Ziggs", "What do you mean this doesn't look safe?");
        manaTypes = new Mana[]{Mana.RED};
        summonCost = new Cost(new ManaAmount(new int[]{1, 0, 1, 0, 0, 0}), 0, false);
        attackDamage = 2;
        setLifepoints(3);
        setSpells(new Spell[]{new Spell(){{
                description = new Description("Bouncing Bomb");
                cost = new Cost(new ManaAmount(), 0, true);
            }

            @Override
            public void cast(Game game, SpellParameter[] parameters){
                game.triggerEvent(new AddPlayerLifepointsEvent(caster.getOwner().getEnemy(), -1));
            }
        }, new Spell(){{
                description = new Description("Self-Explosion");
                cost = new Cost(new ManaAmount(), 0, true);
            }

            @Override
            public void cast(Game game, SpellParameter[] parameters){
                if(game.triggerEvent(new DestroyMonsterEvent((MonsterCard) caster))){
                    game.triggerEvent(new AddPlayerLifepointsEvent(caster.getOwner().getEnemy(), -3));
                }
            }
        }});
    }
}
